#include<iostream>
using namespace std;
struct student
{
    int num;
    float score;
    struct student *next;
};
int main()
{
void printt(student *stud);
student a,b,c,*p,*head;
a.num=31001;a.score=98.5;
b.num=31002;b.score=99.5;
c.num=31003;c.score=100.5;
head=&a;
a.next=&b;
b.next=&c;
c.next=NULL;
p=head;
do
{
    //cout<<"test"<<a.num<<a.score<<a.next;
  //  cout<<p->num<<"  "<<p->score<<endl;
    printt(&a);
//    printt(b);
//    printt(c);
    p=p->next;

    /* code */
} while (p!=NULL);



}
void printt(student *stud)
{
    cout<<stud->num<<"  "<<stud->score<<endl;
}

